﻿
namespace BetaSeriesConnector
{
    class Constants
    {
        public enum SubtitleLanguage { VO, VF, VOVF }

        public const string BaseURL = "http://api.betaseries.com";
        public const string APIKey = "f2680b473b6a";
        
        public static readonly string CacheFile = System.IO.Path.Combine(TV_Organizer.Constants.LocalAppDataFolder, "BetaSeriesConnector_Cache.xml");
        public static readonly string AllShowsURL = string.Format("{0}/shows/display/all.xml?key={1}", BaseURL, APIKey);

        public static string GetSubtitlesURL(string showURL, int season, int episode, SubtitleLanguage language)
        {
            return string.Format("{0}/subtitles/show/{1}.xml?language={2}&season={3}&episode={4}&key={5}", BaseURL, showURL, language, season, episode, APIKey);
        }

        public static string GetEpisodeURL(string showURL, int season, int episode)
        {
            return string.Format("{0}/shows/episodes/{1}.xml?key={2}&summary=1&season={3}&episode={4}", BaseURL, showURL, APIKey, season, episode);
        }

        public static string GetEpisodesURL(string showURL)
        {
            return string.Format("{0}/shows/episodes/{1}.xml?key={2}&summary=1", BaseURL, showURL, APIKey);
        }
    }
}
